package com.zhou.service;

import com.zhou.dao.CultivationPlanDAO;
import com.zhou.entity.CultivationPlan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("cultivationPlanService")
public class CultivationPlanServiceImpl implements CultivationPlanService {

    @Autowired
    private CultivationPlanDAO cultivationPlanDAO;

    @Override
    public List<CultivationPlan> findByMajor(Integer MajorID) {
        return cultivationPlanDAO.findByMajor(MajorID);
    }

    @Override
    public void AddCultivationPlan(List<CultivationPlan> cultivationPlan) {
        cultivationPlanDAO.AddCultivationPlan(cultivationPlan);
    }

    @Override
    public void DeleteCultivationPlan(Integer MajorID, String CourseID) {
        cultivationPlanDAO.DeleteCultivationPlan(MajorID,CourseID);
    }
}
